package com.action;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.dao.UserDao;
import com.entity.User;

@Controller
@Scope("prototype")
public class FindUserAction {
	
	@Resource
	private UserDao userDao;
	
	private List<User> users;
	
	public String load() {
		setUsers(userDao.findAll());
		return "success";
	}

	public List<User> getUsers() {
		return users;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}
	
}
